<template>
  <div id="Hmoe">
    <div class="header">
      <div class="head-left">
        <span>客服热线：400-772-0575</span>
        <span>客服时间：上午9:00--下午17:30（工作日）</span>
      </div>  
      <div class="head-right">
        <span>
          <a href="#">安全保障</a>
          <a href="#">新手引导</a>
          <a href="#">登录</a><a href="#">注册</a>
        </span>
        <span @click="getBill">票据请求</span>
      </div>
      <div class="clear"></div>
      <div>
        <ul>
          <li v-for="(room,index) in billData" :r="room" :key="index">
            <span>{{room.title}}</span>
            <span>{{room.id}}</span>
            <span>{{room.detail}}</span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data(){
    return {
      billData:[]
    }
  },
  created(){
     this.getBill();
  },
  methods:{
    getBill(){
      console.log("this"+this)
      var _this = this
      this.axios.get(`src/data/index.txt`).then(function(data){
          console.log(data);
          console.log(data.data)
           _this.billData = data.data;
          console.log("this.billdata")
          console.log(this.billData)
      }).catch(function(err){
        console.log(err);
      })
    }
  }
}
</script>
<style>
  .head-left{
    float: left;
  }
  .head-right{
    float: right;
  }
  .clear{
    clear: both;
  }
</style>


